<?php

/*
 * Action - 0$*
 * 
 * +2 Actions
 * Return this to the Madman pile. If you do, +1 Card per card in your hand. (This is not in the Supply)
 */

class Madman extends Card implements iAction, iDarkAges {

    public function __construct() {
        parent::__construct("Madman", 0);
        $this->undoPlay = false;
        $this->undoBuy = false;
    }

    public function getDescription() {
        return array(
            "+2 Actions",
            "Return this to the Madman pile. If you do, +1 Card per card in your hand. (This is not in the Supply)");
    }

    public function play(Game $game, $isRealCard) {
        $game->addActions(2);
        ScreenDisplay::addScreenMessage($game, true, "get +2 actions", "gets +2 actions ");

        $card = $game->moveCardFromPileToPile($this, PlayArea, Madman);
        if ($card && $isRealCard) {
            $playHandSize = $game->getPlayHandSize();
            $drawed_cards = $game->drawCards($playHandSize);
            ScreenDisplay::addScreenMessage($game, false, " and draw " . nicePrint($drawed_cards), " and draws " . sizeof($drawed_cards) . " cards");
        }
        $game->cardActionFinished();
        return true;
    }

}

?>